<template>
  <div class="page-container">
    <span>工程师管理</span>
    <!-- <div class="control-container">
      <div class="left-panel">
        <el-input
          v-model="filterText"
          placeholder="输入关键字进行过滤"
        />
        <el-tree
          ref="tree"
          class="filter-tree"
          :data="data"
          :props="defaultProps"
          default-expand-all
          :filter-node-method="filterNode"
          @node-click="handleNodeClick"
        />
      </div>
      <div class="right-panel">
        <div class="search-panel">
          <el-form :inline="true" :label-width="100">
            <el-form-item label="行业类别">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="控制类型">
              <el-select v-model="value" placeholder="请选择">
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="企业名称">
              <el-input v-model="value" />
            </el-form-item>
          </el-form>
        </div>
        <div class="table-tools-bar">
          <el-button type="primary" @click="handleSelect">查询</el-button>
          <el-button type="primary" @click="handleExport">导出</el-button>
          <el-button type="primary"></el-button>
        </div>
        <div class="table-panel">
          <el-table
            class="grid-data-table"
            height="calc(100vh - 400px)"
            :data="tableData"
          >
            <el-table-column align="center" type="index" width="80" />
            <el-table-column prop="time" label="企业名称" class-name="color-green"  />
            <el-table-column prop="ls" label="控制类型" />
            <el-table-column prop="ph" label="组织机构代码" />
            <el-table-column prop="cod" label="法人代表" />
            <el-table-column prop="nh" label="企业地址" />
            <el-table-column prop="n" label="邮编" />
            <el-table-column prop="l" label="传真" />
            <el-table-column prop="" label="联系人" />
          </el-table>
          <div class="pagination-container">
            <Pagination
              v-show="query.total>0"
              :total="query.total"
              :page.sync="query.page"
              :limit.sync="query.limit"
              @pagination="initData"
            />
          </div>
        </div>
      </div>
    </div> -->
  </div>
</template>

<script>
// import Pagination from '@/components/Pagination'

export default {
  name: 'EngineerPage',
  components: {
    // Pagination
  },
  data() {
    return {
      filterText: '',
      query: {
        type: 1,
        time: '',
        total: 0,
        page: 1,
        limit: 10
      },
      tableData: [
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' }, { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' },
        { time: '2020-11-10 11:17:00', ls: '0.000', ph: '0.000', cod: '0.000', nh: '0.000', n: '0.000', l: '0.000' }

      ],
      data: [{
        id: 1,
        label: '资中县',
        children: [{
          id: 4,
          label: '资中污水厂',
          children: [{
            id: 9,
            label: '资中污水厂'
          }]
        }]
      }, {
        id: 2,
        label: '隆昌县',
        children: [{
          id: 5,
          label: '金盛食品',
          children: [{
            id: 9,
            label: '金盛食品'
          }]
        }, {
          id: 6,
          label: '川东龙纸业',
          children: [{
            id: 9,
            label: '金盛食品'
          }]
        }]
      }],
      defaultProps: {
        children: 'children',
        label: 'label'
      }
    }
  },
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val)
    }
  },
  methods: {
    initData() {

    },
    filterNode(value, data) {
      if (!value) return true
      return data.label.indexOf(value) !== -1
    },
    handleNodeClick(data) {
      console.log(data)
    },
    // 查询
    handleSelect() {},
    // 导出
    handleExport() {}
  }
}
</script>

<style lang="scss" scoped>
</style>
